package com.ankifyh.lazeedrive;

import android.annotation.SuppressLint;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

public class TipActivity extends AppCompatActivity {

    private static final String DRAWABLE_RESOURCE_NAME = "reward_qrcode"; // 替换为您的打赏码图片资源名称

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tip);

        ImageView rewardQrCodeView = findViewById(R.id.reward_qrcode_view);

        // 加载并设置打赏码图片
        Resources resources = getResources();
        int drawableResourceId = resources.getIdentifier(DRAWABLE_RESOURCE_NAME, "drawable", getPackageName());
        @SuppressLint("UseCompatLoadingForDrawables") Drawable rewardQrCodeDrawable = resources.getDrawable(drawableResourceId, null);
        rewardQrCodeView.setImageDrawable(rewardQrCodeDrawable);
    }
}